//
//  KDPatrolPageRequestTool.m
//  PublicSentimentMonitorSystem
//
//  Created by 魏强 on 15/6/19.
//  Copyright (c) 2015年 魏强. All rights reserved.
//

#import "KDPatrolPageRequestTool.h"
#import "KDPatrolGetMyTaskParam.h"
#import "KDPatrolgetReportParam.h"
#import "KDPatrolgetReportResult.h"
#import "KDGetAllReginDataParam.h"
#import "KDGetAllReginDataResult.h"
#import "KDGetAllClueTyoeParam.h"
#import "KDGetAllClueTyoeResult.h"
#import "KDBaseTool.h"
@implementation KDPatrolPageRequestTool

+ (void)sendReportWithParam:(KDPatrolgetReportParam *)param success:(void (^)(KDPatrolgetReportResult *responseObejct))success failure:(void(^)(NSError *error))failure{
    KDAccount *account = [KDAccountTool account];
    NSString *url = [NSString stringWithFormat:@"%@&method=reportMobile&token=%@", ServerActionAddr, account.tokens];
    NSLog(@"%@", url);
    [KDBaseTool post:url param:param resultClass:[KDPatrolgetReportResult class] success:success failure:failure];
}

+ (void)getAllReginDataWithParam:(KDGetAllReginDataParam *)param success:(void (^)(KDGetAllReginDataResult *responseObejct))success failure:(void(^)(NSError *error))failure{
    NSString *url = [NSString stringWithFormat:@"%@&method=reportRegion", ServerActionAddr];
    [KDBaseTool get:url param:param resultClass:[KDGetAllReginDataResult class] success:success failure:failure];
}
/**
 *  获取所有线索类型
 */
+ (void)getAllClueDataWithParam:(KDGetAllClueTyoeParam *)param success:(void (^)(KDGetAllClueTyoeResult *responseObejct))success failure:(void(^)(NSError *error))failure{
    KDAccount *account = [KDAccountTool account];
    NSString *url = [NSString stringWithFormat:@"%@&method=reportType&token=%@", ServerActionAddr,account.tokens];
    
    [KDBaseTool get:url param:param resultClass:[KDGetAllClueTyoeResult class] success:success failure:failure];
}
@end
